local midu = fk.CreateSkill {
  name = "th_midu",
  tags = { Skill.Compulsory },
}

midu:addEffect(fk.Damaged, {
  anim_type = "masochism",
  can_trigger = function(self, event, target, player, data)
    return target == player and player:hasSkill(midu.name) and data.from and data.from ~= player and not data.from.dead and not data.from:isNude()
  end,
  trigger_times = function(self, event, target, player, data)
    return data.damage
  end,
  on_use = function(self, event, target, player, data)
    local room = player.room
    local card = room:askToChooseCard(player, {
      target = data.from,
      flag = "he",
      skill_name = midu.name
    })
    room:throwCard(card, midu.name, data.from, player)
    player:drawCards(1, midu.name)
  end
})

Fk:loadTranslationTable{
  ["th_midu"] = "靡毒",
  [":th_midu"] = "锁定技，当你受到其他角色造成的1点伤害后，你弃置其一张牌，摸一张牌。",
}

return midu